<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="yes" />
<title><?=$da['title']?></title>
<link rel="shortcut icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="<?=$da['p']?>/css/cssm.css?<?=$nowtime?>">
<link rel="stylesheet" type="text/css" href="mode/plugin/css/jquery-rockdatepicker.css"/>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/js.js?<?=$nowtime?>"></script>
<script type="text/javascript" src="js/base64-min.js"></script>
<script type="text/javascript" src="mode/plugin/jquery-rockdatepicker.js"></script>
<script type="text/javascript" src="mode/plugin/jquery-rockdatepicker-mobile.js"></script>
<script type="text/javascript" src="web/res/js/jquery-rockupload.js"></script>
<script type="text/javascript" src="<?=$da['p']?>/flow/input/inputjs/input.js?<?=$nowtime?>"></script>
<script type="text/javascript" src="web/res/js/jquery-changeuser.js?<?=$nowtime?>"></script>
<script type="text/javascript" src="web/res/js/jquery-imgview.js"></script>
<script type="text/javascript" src="mode/plugin/jquery-rockmodels.js"></script>
<script type="text/javascript">
<?php
$maincolor = getconfig('apptheme','#1389D3');
?>
var editor,arr=<?=$da['fieldsjson']?>,moders=<?=json_encode($da['moders'])?>,gongsiarr=<?=json_encode($da['gongsiarr'])?>,subfielsa=<?=json_encode($da['subfielsa'])?>,zbnamearr=<?=json_encode($da['zbnamearr'])?>,isedit=0,mid='<?=$da['mid']?>',isinput=1,data={},maincolor='<?=$maincolor?>',tempdata='<?=$tempdata?>';
ismobile=1;
js.changeuser=function(na,lx,tit,cans){
	var can = {
		'changetype':lx,
		'titlebool':get('header_title'),
		'idobj':get(na+'_id'),
		'nameobj':get(na),
		'onselect':function(sna,sid){
			js.changeuser_after(this.formname,this,sna,sid);
		}
	};
	var formname = get(na).name;
	var bcar = js.changeuser_before(formname),i;
	for(i in cans)can[i]=cans[i];
	if(typeof(bcar)=='string' && bcar){js.msg('msg', bcar);return;}
	if(typeof(bcar)=='object')for(i in bcar)can[i]=bcar[i];
	can.formname = formname;
	$('body').chnageuser(can);
}
function clearuser(na){
	get(na).value='';
	get(na+'_id').value='';
	get(na).focus();
}
js.datechange=function(o1,lx){
	$.rockdatepicker_mobile({
		'inputobj':o1,
		'view':lx
	});
}
function initApp(){
	js.setapptitle(moders.name);
}
</script>
<style>
<?php
$maincolora= c('image')->colorTorgb($maincolor);
$maincolors= ''.$maincolora[0].','.$maincolora[1].','.$maincolora[2].'';
echo 'body{--main-color:'.$maincolor.';--font-size:16px;}';
?>
.datesss{background:url(mode/icons/date.png) no-repeat right;cursor:pointer}
input,textarea,select,*,td, button{font-size:16px}
.lurim{text-align:right;padding-left:5px}
.tablesub td{height:25px;text-align:left;border:0px #888888 solid;}
.tablesub .inputs{width:-webkit-fill-available}

.status{position: absolute;right:15px;top:2px;display:none;width:70px;height:70px;overflow:hidden; border:2px red solid;border-radius:50%;font-size:16px;text-align:center;line-height:70px;color:red;transform:rotate(-45deg);-o-transform:rotate(-45deg);-webkit-transform:rotate(-45deg);-ms-transform:rotate(-45deg)}


.btn-default{background-color:#1389D3;}
.btn-danger{background-color:#d9534f;}
.btn:hover{opacity:1;color:#ffffff}
.lumtr{background-color:white}
.tablelum{}
.inputs1{border-bottom:0.5px #cccccc solid;border-top:0px;border-left:0px;border-right:0px}
.inputs1:focus{border:none;box-shadow:none;border-bottom:0.5px <?=$maincolor?> solid;}


.divzb0{display:inline-block;width:100%;margin:5px 0px}
.divzb1{float:left;width:25%;overflow:auto;text-align:right;line-height:20px;margin-top:8px}
.divzb2{float:left;width:73%}
.xuhao{border:none;font-size:12px;text-align:left;color:#888888;padding:0;margin:0;margin-left:2px;padding-top:2px}
.xuhao:focus{border:none;}
.xuantitle{text-align:left;font-size:12px;padding-left:8px;line-height:30px;margin-top:10px;color:#888888;}
.divinput .btn-group{width:98%}
</style>
</head>

<body class="mbody">
<?php 
if($showheader==1)echo '<div id="header_title" style="padding-top:'.$cenghei.'px" class="header"><span onclick="js.back()" class="header-back"></span>'.$da['title'].'</div><div style="height:'.($cenghei+50).'px;overflow:hidden"></div>';
?>

<div  style="position:relative">
	<div class="status"></div>
	<form name="myform" autocomplete="off">
		<input name="id" type="hidden" value="<?=$da['mid']?>">
		<input name="sxuanfileid" type="hidden" value="">
		<?php 
		for($i=0;$i<$da['zbshu'];$i++)echo '<input value="0" type="hidden" name="sub_totals'.$i.'">';
		?>
		<div style="padding-top:10px">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tablelum">
		<?php if($da['mid']==0){?>
		<tr class="lumtr">
			<td class="lurim" nowrap>填写人</td>
			<td><div class="divinput"><?=$da['adminname']?></div></td>
		</tr>
		<?php
		}
		echo $da['content'];
		if($da['isupfile']==1){
		?>
		<tr class="lumtr">
		<td class="lurim" nowrap><?=$da['isupfiles']?></td>
		<td><div class="divinput">
			<input name="fileid" id="fileidview-inputEl" type="hidden">
			<div id="view_fileidview" style="height:auto;min-height:60px" class="inputs"></div>
			<div><input style="width:150px" onchange="f.change(this)" type="file"></div>
		</div></td>
		</tr>
		<?php
		}
		$firstrs = array();
		if($da['course']){
			$coursestr = '<div align="center" style="padding:20px 0px">';
			$coursestr .='<table><tr>';
			foreach($da['course'] as $k=>$rs){
				$coursestr .='<td><div class="course">'.$rs['name'].'';
				$coursestr .='</div></td>';
				if($rs['id']>-1){
					if($rs['id'] > 0){
						if(!$firstrs)$firstrs = $rs;
						if($rs['isnow'])$firstrs = $rs;
					}
					$coursestr .='<td><div class="coursejt"></div></td>';
					$coursestr .='<td><div class="coursejts"></div></td>';
				}
			}
			$coursestr .= '</tr></table>';
			$coursestr .= '</div>';
			//判断流程步骤是否上步指定
			if($firstrs && $firstrs['checktype']=='change'){
				$placeholder = '可不选';
				$firstrs['isbt'] = 0;
				$stsp = '<tr><td colspan="2"><div class="xuantitle">选择审批人</div></td></tr>';
				$stsp.= '<tr class="lumtr">';
				$stsp.= '<td class="lurim" nowrap>';
				if($firstrs['checktype']=='change'){
					$stsp.='<font color=red>*</font>';
					$placeholder = '必须指定人员'.arrvalue($firstrs,'explain').'';
					$firstrs['isbt'] = 1;
				}
				$stsp.= ''.$firstrs['name'].':</td>';
				$stsp.= '<td><div class="divinput"><table width="98%" cellpadding="0" border="0"><tr><td width="100%"><div class="btn-group"><input class="inputs" style="flex:1" id="sysnextchange" value="'.$firstrs['sysnextopt'].'" placeholder="'.$placeholder.'" readonly type="text" name="sysnextopt"><input name="sysnextoptid" value="'.$firstrs['sysnextoptid'].'" id="sysnextchange_id" type="hidden"><input name="sysnextcustidid" value="'.$firstrs['id'].'" type="hidden">';
				$stsp.= '<button type="button" onclick="js.changeclear(\'sysnextchange\')" class="webbtn">×</button><button type="button" id="btnchange_recename" onclick="js.changeuser(\'sysnextchange\',\'changeusercheck\',\'\',{changerange:\''.$firstrs['checktypeid'].'\'})" class="webbtn">选择</button></div></td></tr></table></div></td>';
				$stsp.= '</tr>';
				echo $stsp;
			}
		}
		
		
		//是否抄送
		$iscs = (int)$da['moders']['iscs'];
		if($iscs>0){
			$csstr= $inputobj->inputchangeuser(array(
				'name'		=> 'syschaosong',
				'id'		=> 'syschaosongid',
				'placeholder'=>'选择要抄送的人员',
				'type'		=> 'changeusercheck',
				'title'		=> '选择抄送人员',
				'value' 	=> $da['chao']['csname'],
				'valueid'	=> $da['chao']['csnameid']
			));
			echo '<tr><td colspan="2"><div class="xuantitle">抄送</div></td></tr>';
			echo '<tr class="lumtr"><td class="lurim" nowrap><font color="red">'.(($iscs==1) ? '':'*').'</font>抄送给</td><td><div class="divinput">'.$csstr.'</div></td></tr>';
		}
		?>
		</table>
		</div>
	</form>
	<div class="padding10">
		<span id="AltSspan" style="display:none" >
		<?php
		if($da['isflow']>0)echo '<label><input onclick="c.changeturn(this)" value="1" checked type="checkbox" id="sysisturn">直接提交</label>&nbsp;';
		?><a class="hui" id="Altzhan" style="margin-right:10px;display:none" onclick="return c.savezhan()" href="javascript:;">暂存</a>
		<button id="AltS" style="border-radius:5px" type="button" onclick="return c.save()"  class="btn">提交</button></span>
		<div id="msgview"></div>
	</div>
</div>
<script>
firstrs=<?=json_encode($firstrs)?>;
</script>
<script type="text/javascript" src="<?=$da['p']?>/flow/input/inputjs/mode_<?=$da['moders']['num']?>.js?<?=time()?>"></script>
<?php 
if($otherfile)include_once($otherfile);
if($da['showtype']=='view')echo '<script src="webmain/main/flowview/flowview_input.js?'.time().'"></script>';
?>
</body>
</html>